<?php
session_start();
include('menu.php');
if(isset($_POST["email"])){
	$email = $_POST["email"];
	$password = $_POST["password"];

	$query = "SELECT * FROM user WHERE user_email = '$email' and user_pwd = '$password';";

	$query = "SELECT * FROM User WHERE user_mail = '$email' and user_pwd = '$password';";

	$result = mysqli_query($connexion, $query);
		if(mysqli_num_rows($result) > 0){
			$user = mysqli_fetch_array($result);
			$_SESSION["user_id"] = $user['user_id'];
                        echo $_SESSION["id"];
			echo "<br/><br/><br/>";
                        header('location:index.php');

		}else{
			echo "<br/><br/><br/>";
			echo "Mauvais Login et/ou Password";
		}
}
include('login.html')
?>